<?php
// 提交报修后台
header("content-type:text/html;charset=utf-8");
include_once("conn.php");

//设置默认时区
date_default_timezone_set('PRC');
$now_date = date('Y-m-d H:i:s', time());

$fix_id = $_POST['fix_id'];
$u_id = $_POST['u_id'];
$feedback = $_POST['feedback'];

$sql = "INSERT INTO tb_feedback (fix_id, u_id, content, feedback_date) VALUES ('".$fix_id."','".$u_id."','".$feedback."','".$now_date."')";
if(mysqli_query($conn_DB,$sql)){
    echo "<script>location='../u-showfixinfo.php?fix_id=".$fix_id."';</script>";
}else{
    echo "<script>alert('反馈失败！请重试！');history.go(-1);</script>";
}
